<?php

/*
 * This file is part of the symfony package.
 * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * sfValidatorNumber validates a number (integer or float). It also converts the input value to a float.
 *
 * @package    symfony
 * @subpackage validator
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: nlValidatorNumber.class.php 380 2010-12-04 18:51:13Z vitaliytv $
 */
class nlValidatorNumber extends sfValidatorNumber {

    /**
     * @see sfValidatorBase
     */
    protected function doClean($value) {
        // Заменяем запятую на точку
        $value = str_replace(',', '.', $value);
        $clean = parent::doClean($value);

        return $clean;
    }

}
